
package guoan.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 认证随即码
 */
@Entity
@Table(name = "random_key")
public class RandomKey implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID 自增编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * key
     */
    @Column(name = "rkey")
    private String key;

    /**
     * 车型
     */
    @Column(name = "is_use")
    private Long isUse;

    /**
     * 类型,科目二、科目三 ,
     */
    @Column(name = "coach_type")
    private Long coachType;

    /**
     * 教练ID
     */
    @Column(name = "train_id")
    private Long trainId;
    
    @Column(name = "student_id")
    private Long studentId;
    
    @Transient
    private Train train;
    
    public Long getId(){
        return id;
    }

    public void setId(Long id){
        this.id = id;
    }

    public String getKey(){
        return key;
    }

    public void setKey(String key){
        this.key = key;
    }

    public Long getIsUse(){
        return isUse;
    }

    public void setIsUse(Long isUse){
        this.isUse = isUse;
    }

    public Long getCoachType(){
        return coachType;
    }

    public void setCoachType(Long coachType){
        this.coachType = coachType;
    }

    public Long getTrainId(){
        return trainId;
    }

    public void setTrainId(Long trainId){
        this.trainId = trainId;
    }

    public RandomKey(){
        super();
    }

    public RandomKey(Long id, String key, Long isUse, Long coachType, Long trainId){
        super();
        this.id = id;
        this.key = key;
        this.isUse = isUse;
        this.coachType = coachType;
        this.trainId = trainId;
    }

    public Long getStudentId(){
        return studentId;
    }

    public void setStudentId(Long studentId){
        this.studentId = studentId;
    }

    public Train getTrain(){
        return train;
    }

    public void setTrain(Train train){
        this.train = train;
    }

}